package com.xzy.springboot.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope  //刷新
public class Controller {

    /*修改配置文件后若想不重启服务刷新需要发送一个post请求(未引入消息队列前)
    * http://localhost:3355/actuator/refresh远程刷新*/
    /*测试是否能在3355拿到git上配置*/
    @Value("${configinfo}")
    private String configInfo;

    @GetMapping("/configInfo")
    public String getConfigInfo(){
        return configInfo;
    }
}

